package com.zmn.plat.persistence.interfaces.push;

import com.zmn.plat.model.entity.push.notice.PushNoticeAppPutCompany;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 描述: app 公告 公司关系
 *
 * @author wangjie
 * @since  2020/3/26
 **/
public interface PushNoticeAppPutCompanyDao {

    /**
     * 描述: 根据主键查询数据
     *
     * @param key 主键id
     * @return com.zmn.plat.model.entity.push.notice.PushNoticePutApp
     * @author wangjie
     * @since 2020/3/24
     **/
    PushNoticeAppPutCompany findByKey(Integer key);

    /**
     * 描述: 根据公告id查询推送app关系数据
     *
     * @param noticeId 公告id
     * @return java.util.List<com.zmn.plat.model.entity.push.notice.PushNoticePutApp>
     * @author wangjie
     * @since 2020/3/24
     **/
    List<PushNoticeAppPutCompany> listByNoticeId(Integer noticeId);

    /**
     * 描述: 根据公告id查询推送app关系数据
     *
     * @param noticeIdList 公告id
     * @return java.util.List<com.zmn.plat.model.entity.push.notice.PushNoticePutApp>
     * @author wangjie
     * @since 2020/3/24
     **/
    List<PushNoticeAppPutCompany> listByNoticeIdList(@Param(value = "noticeIdList") List<Integer> noticeIdList);

    /**
     * 描述: 批量新增
     *
     * @param pushNoticeAppPutCompanies app 推送关系数据
     * @author wangjie
     * @since 2020/3/24
     **/
    void insertBatch(@Param(value = "pushNoticeAppPutCompanies") List<PushNoticeAppPutCompany> pushNoticeAppPutCompanies);

    /**
     * 描述: 根据公告id删除推送app关系数据
     *
     * @param noticeId 公告id
     * @author wangjie
     * @since 2020/3/24
     **/
    void deleteByNoticeId(Integer noticeId);

}
